package com.inspector.app.ui.flight.statusBar;


import com.inspector.app.util.CommonUtil;

/**
 * 飞行状态栏
 * <p>
 * {"北京时间", "海拔高度", "速度", "航向", "到达点", "剩余距离",
 * "已飞距离", "预达时刻", "最终距离", "最终预达时刻",
 * "当前经度","当前纬度", "偏航距离", "电量", "UTC",
 * "卫星数", "磁航向", "磁差","计时器"};
 *
 * @author CodeK 2023/8/22
 */
public enum FlightStatusBar {

    BJSJ("北京时间","--:--:--", ""),
    HX("航向","0", "°"),
    HBGD("海拔高度","0", "m"),
    SD("速度","0", "km/h"),
    DQJWD("当前经纬度", "--", ""),
    CC("磁差","0","°"),
    YFJL("已飞距离","0", CommonUtil.getDistanceUnit()),
    DL("电量","--",""),
    UTC("UTC","--:--:--", ""),

    /*YDD("预达航点","--", ""),
    SYJL("剩余距离","0", CommonUtil.getDistanceUnit()),
    PHJL("偏航距离","0",CommonUtil.getDistanceUnit()),
    YDSK("预达时刻","--:--", ""),
    ZZJL("最终距离","0", CommonUtil.getDistanceUnit()),
    ZZYDSK("最终预达时刻","--:--", ""),*/
    WXS("卫星数","--:--",""),
    JSQ("计时器","--:--:--", ""),

    CHX("磁航向","0","°"),
    /*DQJD("当前经度","--",""),
    DQWD("当前纬度","--",""),*/
    ;

    private final String title;
    private String content;
    private String extendContent;
    FlightStatusBar(String title, String content, String extendContent) {
        this.title = title;
        this.content = content;
        this.extendContent = extendContent;
    }

    public String getTitle() {
        return title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getExtendContent() {
        return extendContent;
    }

    public void setExtendContent(String extendContent) {
        this.extendContent = extendContent;
    }

    @Override
    public String toString() {
        return "FlightStatusBar{" +
                "title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", extendContent='" + extendContent + '\'' +
                '}';
    }


    //[重置]
    public void resetValues() {
        switch (this) {
            /*case YDD: //[预达点]
                setContent("--");
                setExtendContent("");
                break;
            case PHJL: //[偏航距离]
            case SYJL: //[剩余距离]
            case ZZJL: //[最终距离]
                setContent("0");
                setExtendContent(CommonUtil.getDistanceUnit());
                break;
            case YDSK:
            case ZZYDSK:
                setContent("--:--");
                setExtendContent("");
                break;*/

            case DQJWD:
                setContent("--");
                break;

        }
    }


}
